﻿# coding: utf-8

import mk3de

import Misc.Language.Chinese

# Load all configures
import Editor
import Utilities
GLOBAL_SETTING.Load()

# Show splash screen
#from wxFramework.wxSplashScreenApp import wxSplashScreenApp
#splashApp = wxSplashScreenApp()
#splashApp.MainLoop()
    
# Create world editor application
import wxFramework
from wxFramework.wxWorldEditorApp import wxWorldEditorApp
app = wxWorldEditorApp()

# Initialize world editor:
if WORLD_EDITOR.CreateEngine():


    # Initialize before loop
    app.Initialize()
    
    # Initialize world editor
    WORLD_EDITOR.CreateEditor()

    # Enter the main loop
    app.MainLoop()

    # Destroy the world editor.
    WORLD_EDITOR.Destroy()

# Save all configures
GLOBAL_SETTING.Save()

